package com.heaven.study.strategy;

public class AddStrategy implements Strategy {

    private int num1, num2, num3;

    public AddStrategy(int num1, int num2, int num3) {
        this.num1 = num1;
        this.num2 = num2;
        this.num3 = num3;
    }

    @Override
    public void calc() {
        int totalValue = this.num1 + this.num2 + this.num3;
        System.out.println(String.format("%s + %s + %s = %s", this.num1, this.num2, this.num3, totalValue));
    }
}